package shopping;

class goods
{
    String goodsname;   //商品名称
    double price;       //商品价格
    int number;         //商品剩余数量

    //默认初始化商品函数
    public goods(){}

    //初始化商品函数
    public goods(String goodsname, double price, int number)
    {
        this.goodsname = goodsname;
        this.price = price;
        this.number = number;
    }
}